package cn.hyy.controller;

import cn.hyy.domain.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ServiceAController {

    @GetMapping("/test/{id}")
    public User getById(@PathVariable("id") Long id){
        try {
            Thread.sleep(7000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        User user = new User();
        user.setId(id);
        user.setUsername("hyy");
        user.setPassword("hyy");
        System.out.println("9006调用9007成功"+user);
        return user;
    }

}
